<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% snapshot = grab_attributes(pwd)['snapshot'] -%>
<% gcp_zone = "#{external_attribute(pwd, 'gcp_zone', doc_generation)}" %>
describe google_compute_snapshots(project: <%= gcp_project_id -%>) do
  its('count') { should be >= 1 }
end

describe.one do
  google_compute_snapshots(project: <%= gcp_project_id -%>).names do |snapshot_name|
    describe google_compute_snapshot(project: <%= gcp_project_id -%>, name: snapshot_name) do
      its('source_disk') { should match <%= doc_generation ? "'#{snapshot['disk_name']}'" : "snapshot['disk_name']" -%> }
    end
  end
end